<template>
    <view class="bg-color-fff checkGoods u-flex flex-both">
        <view class="u-flex">
            <image style="width: 70rpx;height: 70rpx;" src="@/static/index2/20241101130857.png" mode=""></image>
            <view class="u-margin-left-20">
                <view class="u-font-24" style="color:#999;">车辆名称</view>
                <view>植物奶油</view>
            </view>
        </view>
        <view>
            <u-button type="primary" shape="circle" size="mini" @click="checkGoods">{{ $t('选择商品') }}</u-button>
        </view>



        <u-popup v-model="goods_list_show" mode="left" width="100%">
            <view style="height: 100%;">
                <goodslist2 @change="select_goods"></goodslist2>
                <view style="background:transparent;width: 100%;z-index: 1;margin-top: 20rpx;" @click="close_goodslist">
                    <view
                        style="font-size: 30rpx;background-image:linear-gradient(to right, #0167eb, #00baf9);color: #fff;width: 600rpx;text-align: center;border-radius: 36rpx;margin-left: 20rpx;height: 80rpx;margin: 0 auto;line-height: 80rpx;">
                        <view v-if="lang == 'zh'">
                            关闭
                        </view>
                        <view v-else>
                            Закрыть
                        </view>
                    </view>
                </view>
            </view>
        </u-popup>

    </view>
</template>

<script>
import goodslist2 from "./goodslist2.vue"
export default {
    components: {
        goodslist2
    },
    data () {
        return {
            goods_list_show: false,
            lang: this.$i18n.locale,
        };
    },
    methods: {
        checkGoods () {
            this.goods_list_show = true;
        },
        select_goods (e) {
            this.$emit('select_goods', e);
            this.goods_list_show = false;
        },
        close_goodslist () {
            this.goods_list_show = false;
        }
    }
}
</script>

<style lang="less" scoped>
.checkGoods {
    border-radius: 30rpx;
    padding: 30rpx;
}
</style>